<#macro  createTable styleClass tabfields isCheckBox checkBoxName func funcButton>
<style>

.${styleClass!'container1100'} table.gridtable {  
    font-family: verdana,arial,sans-serif;  
    font-size:11px;  
    color:#333333;  
    border-width: 1px;  
    border-color: #666666;  
    border-collapse: collapse;  
    width: 100%;
}  
.${styleClass!'container1100'} table.gridtable th {  
    background-color: #D9EAFA;
    font-size: 16px;
    color: #1c6dc9;
    height: 45px;
    font-weight:500;
    text-align: left;  
}  
.${styleClass!'container1100'} table.gridtable td {  
    background-color: #fff;
    font-size: 16px;
    height: 45px;
    border-bottom: 1px dashed #F6F6F6;
    text-align: left;
}
.${styleClass!'container1100'} table.gridtable .g_checkbox {  
   width: 50px;
   text-align: center;
}  
.${styleClass!'container1100'} table.gridtable a{  
	color: green;
}
.${styleClass!'container1100'} table.gridtable a:hover {color: #1c6dc9} /* 鼠标移动到链接上时的状态 */
</style>
<#if funcButton?exists>
	<@funcButton/>
</#if>	
<table class="gridtable" id="scroll_bar">  
	<thead>
		<tr id="bar_head">  
		    <#if isCheckBox>
			    <th class="g_checkbox">
			    <input type="checkbox" id="checkAll_C"></input>
			    </th>
			</#if>
			<#list tabfields as field>
			    <th>${field}</th>
			</#list>
		</tr>  
	</thead>
	<#if func?exists>
	     <@func/>
	</#if>	
	</table> 
<script>
$("#checkAll_C").click(function(){   
    if(this.checked){   
        $("input[name='${checkBoxName!}']").prop("checked", true);  
    }else{   
		$("input[name='${checkBoxName!}']").prop("checked", false);
    }   
});

$("input[name='${checkBoxName!}']").click(function(){   
    if($('#checkAll_C').is(':checked') && !this.checked) {
    	$("#checkAll_C").prop("checked",false)
    } else {
        var ca = true;
        $("input[name='${checkBoxName!}']").each(function(){
    		if(!this.checked) {
    			ca = false;
    		}
    	});
    	$("#checkAll_C").prop("checked",ca);
    }
});
</script>
</#macro>